<template>
	<div class="lk-dbl">
		<a href="" class="lk-fk">反馈</a>
		<a href="###" class="lk-top">顶部</a>
	</div>
</template>

<script>
	export default {
		name: "top",
		mounted() {
			window.addEventListener('scroll', function() {
				console.log(scrollY)
				if (scrollY>152) {
					console.log(2)
				}else{
					console.log(1)
				}
			})
		}
}
		$(function() {
			$(".lk-top").click(function() {
				$('html').animate({
					scrollTop: 0
				}, 500)
			})

		})
</script>

<style scoped>
	.lk-dbl {
		position: fixed;
		bottom: 0;
		right: 0;
		z-index: 9999999;
		transition: all 1s linear;
		display: none;
	}
	
	.lk-dbl>a {
		display: block;
		width: 35px;
		background-color: #498E3D;
		font-size: 12px;
		color: #fff;
		text-align: center;
		padding-top: 20px;
		border-radius: 5px;
		margin-bottom: 4px;
		font-weight: 500;
	}
	
	.lk-dbl>a:first-child {
		background: url(../assets/pen.png) no-repeat center 5px/80% 15px #498E3D;
	}
	
	.lk-dbl>a:last-child {
		background: url(../assets/top.png) no-repeat center 5px/80% 15px #498E3D;
	}
</style>